package com.demo;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

import com.utils.ConstantUtil;
import com.utils.HttpHelper;
import com.utils.HttpResponse;
import com.utils.HttpUtil;
import com.utils.JsonUtil;

public class NotifyTest {
	
	public static void main(String[] args) {
		notifyTest();
	}
	
	public static void notifyTest(){
		try {
		EncryptManager encryptManager = new EncryptManager();
		encryptManager.initEncrypt();

		String urlString = "http://113.240.245.133:81/ppayGate/notify.html";
		
		//String urlString = "http://172.19.10.102:8080/ppayGate/notify.html";

		Map<String, String> resMap = new HashMap<String, String>();
		resMap.put("Version", ConstantUtil.VERSION);
		resMap.put("MerchantId", ConstantUtil.MERCHANTID);  //商户号
		resMap.put("MerchOrderId", "DK04201705261131470173828");
		resMap.put("Status", "02");  //02成功  04已过期  05已作废
		resMap.put("respCode", "0000"); 
		resMap.put("respDesc", "");
		// 发送请求
		
		String resp = HttpUtil.sendGet(urlString, resMap, "UTF-8");
			
		System.out.println(resp);
		
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
